feat: Milestone 2.1 l1 -> l2 messaging#703
Conversation
|
|
||
| // ********** Events that are processed inbetween blocks ********** | ||
|
|
||
| // Process l1ToL2Messages, these are consumed as time passes, not each block |
| }); | ||
|
|
||
| router.get('/l1-l2-message-and-index', async (ctx: Koa.Context) => { | ||
| router.get('/l1-l2-message', async (ctx: Koa.Context) => { |
There was a problem hiding this comment.
you have to change the URL in http-node.ts too here - https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec-node/src/aztec-node/http-node.ts#L250
|
|
||
| // Wait for the archiver to process the message | ||
| const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); | ||
| await delay(5000); /// waiting 1 second. |
There was a problem hiding this comment.
nit: waiting 5 seconds (fix comment)
| const initialBalance = 10n; | ||
| const [ownerAddress, receiver] = accounts; | ||
| const ownerPub = await aztecRpcServer.getAccountPublicKey(ownerAddress); | ||
| const deployedContract = await deployContract(initialBalance, pointToPublicKey(ownerPub)); |
There was a problem hiding this comment.
can you rename this to deployedL2Contract? Since we have a contract in L1 and another on L2, can get quite confusing
| logger('Consuming messages on L2'); | ||
| // Call the mint tokens function on the noir contract | ||
| const mintAmount = 100n; | ||
|
|
There was a problem hiding this comment.
question - should we add expect() on methods in the archiver? See if the archiver actually processed everything correctly (i.e. added to pending store and later added to confirmed store)?
There was a problem hiding this comment.
Sounds like a good to have, ill add this. edit: this seems more of a unit test thing rather than integration test thing, ill not do it here
Description
Closes: #515
Completes private calls side of Milestone 2 (i think - :catjam:)
Checklist: